package com.iflytek.aisol.audit.iflytek.strategy.manage.mapper;


import com.iflytek.aisol.audit.iflytek.strategy.manage.entity.EngineParam;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EngineParamMapper extends JpaRepository<EngineParam, Long> {
    /**
     * 根据引擎类型查询字段配置
     *
     * @param engineType 引擎类型
     * @return 参数配置列表
     */
    @Query("SELECT e FROM EngineParam e WHERE e.engineType = :engineType")
    List<EngineParam> findByEngineType(@Param("engineType") String engineType);

    @Query("SELECT e FROM EngineParam e WHERE e.engineType = :engineType " +
            "AND e.paramName = :paramName")
    EngineParam findByEngineTypeAndParamName(@Param("engineType") String engineType,
                                             @Param("paramName") String paramName);
}
